package com.course.system.controller;

import com.course.server.domain.Test;
import com.course.server.service.TestService;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author: aqie
 * @create: 2020-07-03 19:40
 **/
@RequestMapping("/")
@RestController
@AllArgsConstructor
public class HelloController {

    private final TestService testService;

    @GetMapping("/hello")
    public String hello(){
        return "hello system";
    }

    @GetMapping("test")
    public List<Test> test(){
        return testService.list();
    }
}
